Skip to content

docs: AWS Bedrock setup walkthrough for new AWS accounts - #10

Merged
equationalapplications merged 11 commits into
mainfrom
docs/aws-bedrock-setup
Aug 11, 2026
Merged

docs: AWS Bedrock setup walkthrough for new AWS accounts#10
equationalapplications merged 11 commits into
mainfrom
docs/aws-bedrock-setup

Conversation

@equationalapplications

Copy link
Copy Markdown
Owner

Adds docs/11-aws-bedrock-setup.md — CLI-first, end-to-end AWS setup for a brand-new
account, from local prerequisites through a verified end-to-end Discord post.

Closes the gaps the remote collaborator hit: the deployer's own IAM principal, the
Marketplace-vs-vendor-site confusion, the missing container-runtime prerequisite (the
Lambda is a DockerImageFunction), and the second Bedrock model
(amazon.titan-embed-text-v2:0) that no doc previously named.

Also moves the old 02-rehydration.md §Bedrock setup section into it, re-points the
README, and updates the lesson-script prerequisite.

Docs only — no changes under src/, infra/, or tests/.

Spec: docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md
Plan: docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md

🤖 Generated with Claude Code

claude added 10 commits August 10, 2026 20:48
Closes the docs gap between what the tutorial currently tells a reader
about getting Bedrock working and what they actually need to know:
- Account/region reachability check
- Deployer CLI principal IAM permissions (currently unstated)
- cdk bootstrap as a first-time prerequisite (currently unstated)
- AWS Marketplace subscription, with explicit disambiguation from the
  vendor's direct site
- Per-family EULA caveat (Anthropic only)
- First-deploy smoke + optional real-Bedrock-call trigger
- Tail reference: regions, model switching, cost monitoring, troubleshooting

Design only; implementation plan and reader-facing doc follow in
subsequent commits.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 16 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d368cd94-1794-4d5f-b40a-03819fa29a50

📥 Commits

Reviewing files that changed from the base of the PR and between df61409 and 9bceaf7.

📒 Files selected for processing (3)
  • docs/11-aws-bedrock-setup.md
  • docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md
  • docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md
📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive AWS Bedrock setup guide covering prerequisites, model access, deployment, verification, configuration, costs, and troubleshooting.
    • Updated the README documentation links and lesson prerequisites.
    • Moved Bedrock setup instructions out of the rehydration guide into the dedicated walkthrough.
    • Added supporting design and implementation planning documentation.

Walkthrough

The PR adds a standalone AWS Bedrock setup guide. It moves Bedrock instructions out of rehydration documentation and updates README and lesson prerequisites to reference the new guide.

Changes

AWS Bedrock setup documentation

Layer / File(s) Summary
Guide prerequisites and AWS access
docs/11-aws-bedrock-setup.md
Documents local prerequisites, AWS authentication, Bedrock availability, IAM permissions, CDK bootstrap behavior, and Marketplace subscription.
Model verification and deployment flow
docs/11-aws-bedrock-setup.md
Adds model access checks, API probes, deployment steps, smoke tests, and optional end-to-end triggering.
Regional, model, cost, and troubleshooting reference
docs/11-aws-bedrock-setup.md
Documents regional configuration, model switching, estimated costs, and troubleshooting guidance.
Documentation navigation and prerequisites
README.md, docs/02-rehydration.md, docs/09-lesson-script.md
Moves Bedrock setup out of rehydration guidance, updates README links and listings, and expands lesson prerequisites.
Guide design and implementation records
docs/superpowers/plans/..., docs/superpowers/specs/...
Adds the design specification and implementation plan for the Bedrock setup documentation and its verification criteria.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: claude

Poem

A rabbit hops through Bedrock’s door,
With CLI checks and models galore.
IAM boots the stack just right,
Smoke tests glow in morning light.
Clear docs guide each furry flight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: a new AWS Bedrock setup walkthrough.
Description check ✅ Passed The description accurately explains the new guide, moved content, updated references, and documentation-only scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates all AWS Bedrock prerequisites and first-deploy troubleshooting into a single CLI-first walkthrough for brand-new AWS accounts, then rewires the tutorial’s existing entry points to reference it (instead of burying setup notes in the rehydration doc).

Changes:

  • Add docs/11-aws-bedrock-setup.md: end-to-end Bedrock + deployer/IAM + bootstrap + smoke + end-to-end verification steps.
  • Remove the old Bedrock setup section from docs/02-rehydration.md to keep it single-topic.
  • Update README.md and docs/09-lesson-script.md to point to the new canonical setup doc; add a new README docs-table row.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Repoints Bedrock prerequisite link to the new setup doc and adds it to the docs index table.
docs/11-aws-bedrock-setup.md New canonical, CLI-first Bedrock + deployment walkthrough (prereqs → bootstrap → smoke → end-to-end).
docs/02-rehydration.md Removes the Bedrock setup section now that it lives in the new dedicated doc.
docs/09-lesson-script.md Updates prerequisite line to require completing the base tutorial incl. the new AWS setup doc.
docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md Adds the design spec describing scope, structure, and success criteria for the new doc.
docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md Adds the implementation plan/checklist for producing and validating the doc set changes.
Suppressed comments (3)

docs/11-aws-bedrock-setup.md:325

  • If "Reference" is an H2, this section should be nested under it (H3) rather than being another top-level H2 peer of the steps/reference header.
## Region availability

docs/11-aws-bedrock-setup.md:370

  • To keep the heading hierarchy consistent (Steps as H2, Reference as H2), this subsection should be an H3 under the Reference section.
## Cost

docs/11-aws-bedrock-setup.md:382

  • To keep the heading hierarchy consistent (Steps as H2, Reference as H2), this subsection should be an H3 under the Reference section.
## Troubleshooting

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/11-aws-bedrock-setup.md Outdated
Comment thread docs/11-aws-bedrock-setup.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 19

🧹 Nitpick comments (4)
docs/11-aws-bedrock-setup.md (1)

13-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add language identifiers to the fenced blocks.

Add text to the prompt, IAM action list, and stack-output code fences. This resolves the reported markdownlint MD040 warnings.

Also applies to: 94-94, 264-264

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/11-aws-bedrock-setup.md` at line 13, Add the text language identifier to
the fenced code blocks in docs/11-aws-bedrock-setup.md, including the prompt,
IAM action list, and stack-output sections referenced by the listed locations.
Ensure every affected fence has an explicit text language tag to satisfy
markdownlint MD040.

Source: Linters/SAST tools

docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md (2)

51-51: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add languages to the fenced Markdown examples.

markdownlint-cli2 reports missing fence languages at these three locations. Mark the fences as markdown or text to keep the plan lint-clean.

Proposed fix
-```
+```markdown

Also applies to: 258-258, 270-270

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md` at line 51,
Update the three fenced Markdown examples in the plan document, including the
fences near the referenced locations, to specify an appropriate language
identifier such as markdown or text. Preserve the example contents while
ensuring all fences satisfy markdownlint-cli2.

Source: Linters/SAST tools


550-552: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Add assumptions to the repeated cost estimate.

  • docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md#L550-L552: state input/output tokens per tick and the pricing date.
  • docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md#L211-L215: apply the same assumptions or replace the estimate with a pricing formula.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md` around lines 550
- 552, Update the repeated cost estimates in
docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md (lines 550-552) and
docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md (lines
211-215) to state the assumed input and output token counts per tick and the
pricing date; alternatively, replace each estimate with a pricing formula using
those assumptions. Keep both documents consistent.
docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md (1)

51-51: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add languages to the fenced Markdown examples.

markdownlint-cli2 reports missing fence languages at these three locations. Mark the fences as markdown or text.

Also applies to: 258-258, 270-270

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md` at
line 51, Update the three fenced Markdown examples in the setup instructions
design document, including the fences near the referenced locations, to specify
an appropriate language identifier such as markdown or text. Leave the example
contents unchanged.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/11-aws-bedrock-setup.md`:
- Around line 76-78: Update the “Empty output, command succeeds” troubleshooting
row in the Bedrock setup documentation to remove the redundant instruction to
retry with us-east-1. Direct readers instead to verify model availability and
account restrictions, and to choose a supported Region if needed.
- Around line 241-247: Update the synth-time environment variable guidance to
include BEDROCK_MODEL_ID alongside DISCORD_WEBHOOK_URL and FETCH_TRIGGER_TOKEN,
stating that changes must be exported before npm run deploy; clarify that
src/config.ts resolves the runtime default when BEDROCK_MODEL_ID is not set.
- Around line 9-10: Update the introductory verification statement in the setup
guide to say that most AWS-side steps can be verified through the AWS CLI.
Explicitly identify Step 0’s local checks, including docker info and npm test,
and the billing check as exceptions, while preserving the existing guidance
about using an AI assistant for CLI-verifiable steps.
- Around line 9-18: Update the AWS Bedrock setup guidance and its AI-assistant
prompt to avoid defaulting to unrestricted deploy credentials: recommend a
temporary assumed role with scoped permissions, and clearly label
AdministratorAccess as a manual, non-default bootstrap fallback. Add explicit
cleanup instructions for any bootstrap credentials or permissions, including the
related guidance around the later referenced sections.
- Around line 399-400: Update the Step 6 diagnostic guidance to clarify that a
passing converse probe verifies only the AWS CLI principal, not the deployed
Lambda. In the surrounding troubleshooting text, direct readers to check the
Lambda execution-role policy, deployed BEDROCK_REGION, model resource, and
CloudWatch errors before ruling out Bedrock access.
- Around line 157-158: Update the Marketplace subscription guidance near the
Regional setup instructions to state that an identity’s subscription applies
across all supported Regions after subscribing once. Retain the separate checks
for model availability by Region, and remove any wording that tells users to
subscribe again when switching Regions.
- Around line 173-181: Update the model-access verification commands in the
setup instructions to use get-foundation-model-availability for both
zai.glm-4.7-flash and amazon.titan-embed-text-v2:0. Ensure the documented checks
inspect authorizationStatus, agreementAvailability.status,
entitlementAvailability, and regionAvailability, while preserving Step 6 as the
final runtime check.
- Around line 292-294: Update the Function URL prerequisites near the status
probe to document that AWS_IAM callers require SigV4 signing and both
lambda:InvokeFunctionUrl and lambda:InvokeFunction permissions. Describe the
failure boundary: IAM denial returns 403 before token validation, while an
authorized request with an invalid or missing FETCH_TRIGGER_TOKEN returns the
handler’s token error.
- Around line 193-196: Update the Anthropic setup guidance in both referenced
sections to instruct users to submit the Anthropic First Time Use form,
including the intended use case and website URL, before the first invocation.
Retain the separate EULA review warning and remove the outdated Model access
EULA acceptance wording.
- Around line 21-23: Update the Step 4 instructions to distinguish AWS
Marketplace listing/subscription from Bedrock model agreements: document the CLI
commands list-foundation-model-agreement-offers and
create-foundation-model-agreement for explicit agreements or automatic
first-invocation subscription, and retain console guidance only where required
for Marketplace. Include the necessary AWS Marketplace permissions.
- Around line 372-379: Update the cost estimate in the section describing the
default 5-minute cadence to state the input and output token assumptions, Titan
Text Embeddings V2 pricing and token count, and retry assumptions. Replace the
unsupported fixed $0.02–$0.04/day range with a reproducible formula, including
the 288-call worst-case output cost at the configured 512-token cap, or
explicitly label the range as a measured typical case.

In `@docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md`:
- Around line 224-230: Update the expected link-check output in the documented
validation command to include OK 07-budget-protection.md, alongside the existing
expected OK entries. Keep the command and other expected results unchanged.
- Around line 189-194: Update the AWS permissions guidance around the
AdministratorAccess recommendation: do not present account-wide
AdministratorAccess on a dedicated principal as the default path. Instead,
prescribe a temporary deployer role with an expiry or cleanup step, or provide a
scoped policy; if scoping remains out of scope, clearly label
AdministratorAccess as a temporary exception.
- Around line 274-310: Update the model-access verification records in
docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md:274-310 and
docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md:129-148
to use get-foundation-model-availability with each model ID, and verify
authorization, entitlement, agreement, and Region availability rather than
metadata alone. Alternatively, make the Step 6 Converse and Titan InvokeModel
probes mandatory at both documented sites; preserve the separate checks for the
chat and embedding models.
- Around line 339-344: The Bedrock probe and its EULA documentation overstate
validation for alternate models. In
docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md:339-344, either
parameterize the converse probe with the configured BEDROCK_MODEL_ID or
explicitly state that it validates only the default zai.glm-4.7-flash model; in
docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md:21-21,
qualify the corresponding EULA claim to match that model scope.
- Around line 174-187: Update the setup principal permissions list in the
deployment requirements section to include aws-marketplace:Subscribe,
aws-marketplace:ViewSubscriptions, and aws-marketplace:Unsubscribe when that
principal performs Marketplace setup or the first third-party model request;
otherwise explicitly state that an authorized administrator must complete the
Marketplace step.
- Around line 251-272: Update the Marketplace access workflow in
docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md:251-272 and :505-520,
and
docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md:119-127
and :193-201, to explain automatic agreement activation on first invocation
instead of requiring console-only subscription. Document
aws-marketplace:Subscribe, aws-marketplace:Unsubscribe, and
aws-marketplace:ViewSubscriptions permissions, the possible 15-minute activation
delay, and the optional create-foundation-model-agreement CLI/SDK path; preserve
per-Region access and model availability without requiring manual subscription
in every Region, and replace the unconditional free-subscription claim with
current Marketplace listing and pricing terms.

In `@docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md`:
- Around line 170-172: Update the success criteria near “What success looks
like” to identify the single stack output as AgentFunctionUrl, explicitly
stating that smoke uses it for the status probe; remove the wording that implies
a separate smoke status URL.
- Around line 88-96: Update the representative action list in the Bedrock setup
instructions to use events:PutRule instead of events:CreateRule for EventBridge
rule creation and updates; leave the other listed permissions unchanged.

---

Nitpick comments:
In `@docs/11-aws-bedrock-setup.md`:
- Line 13: Add the text language identifier to the fenced code blocks in
docs/11-aws-bedrock-setup.md, including the prompt, IAM action list, and
stack-output sections referenced by the listed locations. Ensure every affected
fence has an explicit text language tag to satisfy markdownlint MD040.

In `@docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md`:
- Line 51: Update the three fenced Markdown examples in the plan document,
including the fences near the referenced locations, to specify an appropriate
language identifier such as markdown or text. Preserve the example contents
while ensuring all fences satisfy markdownlint-cli2.
- Around line 550-552: Update the repeated cost estimates in
docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md (lines 550-552) and
docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md (lines
211-215) to state the assumed input and output token counts per tick and the
pricing date; alternatively, replace each estimate with a pricing formula using
those assumptions. Keep both documents consistent.

In `@docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md`:
- Line 51: Update the three fenced Markdown examples in the setup instructions
design document, including the fences near the referenced locations, to specify
an appropriate language identifier such as markdown or text. Leave the example
contents unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e8b9aed9-16b6-4a2d-8cb6-ce850d10b172

📥 Commits

Reviewing files that changed from the base of the PR and between 5efbcee and df61409.

📒 Files selected for processing (6)
  • README.md
  • docs/02-rehydration.md
  • docs/09-lesson-script.md
  • docs/11-aws-bedrock-setup.md
  • docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md
  • docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md
💤 Files with no reviewable changes (1)
  • docs/02-rehydration.md

Comment thread docs/11-aws-bedrock-setup.md Outdated
Comment thread docs/11-aws-bedrock-setup.md Outdated
Comment thread docs/11-aws-bedrock-setup.md Outdated
Comment thread docs/11-aws-bedrock-setup.md Outdated
Comment thread docs/11-aws-bedrock-setup.md Outdated
Comment thread docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md Outdated
Comment thread docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md Outdated
Comment thread docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md Outdated
…ability probe, synth-time model id, cost formula

- docs/11-aws-bedrock-setup.md: narrow 'every step is CLI' claim to 'most AWS-side
  steps'; soften AI prompt to require confirmation before any grant/subscribe call;
  swap get-foundation-model for get-foundation-model-availability (authorisation,
  agreement, entitlement, region); replace Anthropic EULA wording with First Time
  Use form; add BEDROCK_MODEL_ID to synth-time env vars; document AWS_IAM Function
  URL permissions and the 403 boundary; replace fixed $0.02–$0.04/day with a
  reproducible 288×512×$0.40/1e6 formula; clarify Step 6 converse verifies the CLI
  principal only; fix Reference / Region availability / Switching models / Cost /
  Troubleshooting heading hierarchy; add language tags to all fenced code blocks.

- docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md: same content updates
  applied to the plan record, plus add aws-marketplace:Subscribe/Unsubscribe/
  ViewSubscriptions to the deployer list, label AdministratorAccess as a temporary
  exception, add 07-budget-protection.md to the link-check expected output, and
  the spec/plan EULA claim now scopes to the default zai.glm-4.7-flash probe.

- docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md:
  events:CreateRule → events:PutRule; collapse 'smoke status URL' wording into the
  single AgentFunctionUrl output; cost paragraph rewritten as a reproducible
  formula; remaining untagged markdown fence tagged.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@equationalapplications

Copy link
Copy Markdown
Owner Author

/fix-pr follow-up

Commit: 9bceaf7

Review resolution

docs/11-aws-bedrock-setup.md (13 fixes)

  • Heading hierarchy — # Reference## Reference; subsections (Region availability, Switching models, Cost, Troubleshooting) → ###. (Threads 1, 2)
  • Narrowed the AWS CLI claim — Step 0 local checks (aws sts get-caller-identity, docker info, npm test) and the billing check are now called out as the exceptions; the AI prompt asks the assistant to show any create/subscribe/grant command before running it. (Thread 3, Thread 4)
  • Step 4 — softened "console-only" to "mostly the exception", added a CLI alternative (list-foundation-model-agreement-offers + create-foundation-model-agreement) and the implicit first-invocation subscription path (with the three aws-marketplace:* permissions and the 15-minute activation delay). (Thread 5)
  • Step 1 failure table — removed the redundant "Try --region us-east-1" hint for the empty-output row; the prose above the table already explains the model-availability/account-restriction angle. (Thread 6)
  • Step 4 trailing paragraph — replaced "subscription is per Region" with the AWS-correct version: a subscription enables the model in any Region where the model exists, and model availability is the per-Region check. (Thread 7)
  • Step 5 — swapped get-foundation-model --model-identifier for get-foundation-model-availability --model-id and told the reader to inspect authorizationStatus, agreementAvailability.status, entitlementAvailability, regionAvailability. The Anthropic EULA wording is replaced by the First Time Use form (intended use case + website URL) and a pointer to PutUseCaseForModelAccess. (Threads 8, 9)
  • Step 7 — added BEDROCK_MODEL_ID to the synth-time list with the runtime-default note (src/config.ts:114). (Thread 10)
  • Step 8 — documented the AWS_IAM requirement for the status Function URL: SigV4 signing, both lambda:InvokeFunctionUrl and lambda:InvokeFunction permissions, and the failure boundary (IAM denial → 403 before token validation; missing token → handler-level error after IAM is satisfied). (Thread 11)
  • Cost — replaced the fixed $0.02–$0.04/day range with a reproducible worst-case formula (288 ticks × 512 output tokens × $0.40/1M ≈ $0.059/day) and the token/pricing assumptions behind it; the old range is now labelled as a measured typical case. (Thread 12)
  • Troubleshooting — Step 6 converse probe is now described as verifying the AWS CLI principal only, with explicit pointers to the Lambda execution role, deployed BEDROCK_REGION, model resource, and CloudWatch errors for the Lambda-side diagnosis. (Thread 13)
  • Language tags added to all previously-untagged fences (prompt block, IAM action list, stack-output block, cost formula). (Nitpick)

docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md (6 fixes)

  • IAM action list — added aws-marketplace:Subscribe, aws-marketplace:Unsubscribe, aws-marketplace:ViewSubscriptions (gated on "if the deploying principal also performs Step 4 or the first third-party invocation"). The AdministratorAccess recommendation is relabelled as a temporary exception with a rotate/delete step. (Threads 14, 15)
  • Link-check expected output — added OK 07-budget-protection.md. (Thread 16)
  • Task 2 quoted content (Step 4–6) — same CLI alternative and availability-probe replacements applied as in the live doc; the converse probe is qualified as validating the default zai.glm-4.7-flash only, and the "Why this step exists" paragraph reflects the post-deploy-only failure path. (Threads 17, 18, 19)
  • Reference tail — Cost rewritten to the reproducible-formula shape; Switching models uses the First Time Use form. (Thread 19, Nitpick)
  • IAM list fence tagged text. (Nitpick)

docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md (4 fixes)

  • events:CreateRuleevents:PutRule in the representative deployer action list. (Thread 20)
  • "What success looks like" — collapsed the misleading "smoke status URL" into the single AgentFunctionUrl output that npm run smoke actually probes. (Thread 21)
  • Verification paragraph now scopes the EULA claim to the default zai.glm-4.7-flash probe. (Thread 19)
  • Cost monitoring paragraph rewritten as a reproducible formula; remaining untagged fences (4.2 table row, etc.) tagged markdown. (Nitpick)

Verification

  • typecheck — pass (npm run typecheck, exit 0)
  • tests — pass (16 files, 137 tests, npm test)
  • markdownlint MD040 — 0 issues across all three changed files (previously 4)
  • markdownlint MD013/MD060 — pre-existing, out of scope of this review

Docs-only PR, no behavioural change. The earlier reviewer "verified" set (lines 46, 78, 204, 215, 226, trailing newline) was confirmed unchanged in the working tree at the start of this session.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Suppressed comments (21)

docs/11-aws-bedrock-setup.md:230

  • Step 4 correctly states that the Marketplace subscription is not per Region, so an availability failure cannot mean the subscription “took in a different Region.” This diagnosis sends readers through a redundant subscription flow; distinguish account-wide subscription from per-Region model availability.
  is no longer the gating step for this model. A failure here means Step 4 didn't take,
  or took in a different Region.

docs/11-aws-bedrock-setup.md:395

  • This directly contradicts Step 4, which correctly says the Marketplace subscription is not per Region. Marketplace entitlement is account-wide; model availability and CDK bootstrap are the Region-specific pieces. Re-subscribing after a Region move is unnecessary.
- **The Marketplace subscription is per Region.** Moving Regions means subscribing again
  (Step 4). This catches people who move from `us-east-1` after a working deploy.

docs/11-aws-bedrock-setup.md:460

  • This repeats the per-Region subscription diagnosis that conflicts with Step 4's account-wide entitlement explanation. A Region move can make the model unavailable, but it does not relocate or invalidate the Marketplace subscription.
| `AccessDeniedException` naming the **chat** model | Marketplace subscription missing, or made in another Region | Steps 4, 1 |

docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md:202

  • The implemented walkthrough says the Marketplace subscription is account-wide and only model availability is per Region. This design statement says the opposite, so the linked spec and implementation cannot both be authoritative.
      not available in every Region, and the Marketplace
      subscription is per-Region.

docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md:619

  • The plan already establishes that Marketplace entitlement is account-wide (lines 284–286), so “made in another Region” cannot cause this error. Keeping this row would instruct future implementers to repeat an unnecessary subscription.
| `AccessDeniedException` naming the **chat** model | Marketplace subscription missing, or made in another Region | Steps 4, 1 |

docs/11-aws-bedrock-setup.md:59

  • docker info only verifies Docker, and CDK uses the docker executable by default. A reader with only Finch or Podman will fail this prerequisite and the later image build unless the runtime is checked with its own command and selected via CDK_DOCKER. Document that setup rather than saying all three work with the command above.
confusing place to lose an hour. Docker Desktop, Finch, and Podman all work.

docs/11-aws-bedrock-setup.md:87

  • This error is a transport failure, not evidence that the AWS account lacks Bedrock. In us-east-1 it can result from DNS, proxy, firewall, or local network problems, so directing the reader to replace the account is a false diagnosis.

This issue also appears in the following locations of the same file:

  • line 229
  • line 394
  • line 460
| `Could not connect to the endpoint URL` | Bedrock is not available in the Region you asked for | Your account lacks Bedrock in this Region (Lightsail-only, restricted Region, or SCP-blocked); see the note below |

docs/11-aws-bedrock-setup.md:156

  • This labels Step 4 console-only, but the same section immediately documents create-foundation-model-agreement and implicit first-invocation alternatives. Describe the console as the recommended route instead so the walkthrough is internally consistent.
This is the console-only step, and it is the one people get wrong.

docs/11-aws-bedrock-setup.md:244

  • The probe always invokes zai.glm-4.7-flash, even though Step 7 supports a custom BEDROCK_MODEL_ID. For an Anthropic/Nova deployment this can pass while the configured model's access, First Time Use submission, or runtime identifier is broken, defeating the promised pre-deploy validation. Explain how to probe the identifier the formatter actually uses (src/format/bedrock.ts:23-26).
One real model call, costing a fraction of a cent, tells you whether Steps 1, 4, and 5
actually landed:

docs/11-aws-bedrock-setup.md:407

  • Step 5 already documents the PutUseCaseForModelAccess API, so the Anthropic First Time Use submission is not necessarily a mandatory console step. Keep the one-time requirement, but preserve both supported submission paths.
2. For `anthropic.claude-*`, submit the First Time Use form (intended use case and
   website URL) on **Bedrock → Model access** before the first invocation. This is the
   one family where a console step is still mandatory.

docs/11-aws-bedrock-setup.md:445

  • An AWS Budget alert is not a spending cap: it only sends a notification unless a separate Budget Action is configured. The linked budget guide explicitly leaves actions out of scope, so calling this a “real cap” could lead readers to assume runaway invocations will be stopped automatically.
measured typical case, not a budget ceiling — a leaked `FETCH_TRIGGER_TOKEN` lets an
authorised caller drive Bedrock calls as fast as they can sign requests, and the only
real cap is the budget alarm below. Lambda, S3, and EventBridge at this volume are

docs/11-aws-bedrock-setup.md:458

  • As in Step 1, Could not connect to the endpoint URL is a transport-level failure and does not establish that Bedrock is unavailable in the Region. Include network/proxy/DNS troubleshooting instead of sending readers back to account availability.
| `Could not connect to the endpoint URL` for a `bedrock` call | Bedrock not available in that Region | Step 1 |

docs/superpowers/specs/2026-08-10-bedrock-setup-instructions-design.md:21

  • A probe hardcoded to the default ZAI model cannot validate an Anthropic First Time Use submission or a custom BEDROCK_MODEL_ID. This overstates the success criterion and is why the implemented Step 6 can pass while the model selected for deployment still fails.

This issue also appears on line 201 of the same file.

**Verification is CLI-first.** Each step carries an `aws` command that proves the step succeeded, so a reader can hand the bulk of the procedure to an AI assistant with CLI access rather than clicking through consoles. The AWS Marketplace subscription (Step 4) is the one genuine console-only detour and the doc says so explicitly. A pre-deploy `bedrock-runtime converse` probe (hardcoded against the default `zai.glm-4.7-flash`) collapses subscription, EULA, Region, and model-id mistakes into one sub-cent pass/fail *before* the reader spends a deploy cycle discovering them.

docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md:562

  • Earlier in this same plan (lines 284–286), the Marketplace subscription is correctly described as not per Region. This later instruction contradicts it and was copied into the resulting setup guide.

This issue also appears on line 619 of the same file.

- **The Marketplace subscription is per Region.** Moving Regions means subscribing again
  (Step 4). This catches people who move from `us-east-1` after a working deploy.

docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md:617

  • Could not connect to the endpoint URL is a transport failure, not proof that Bedrock is unavailable in the Region. This planned troubleshooting row propagates a false account/Region diagnosis into the final guide.
| `Could not connect to the endpoint URL` for a `bedrock` call | Bedrock not available in that Region | Step 1 |

docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md:629

  • Passing the CLI probe does not rule out model access problems in the deployed Lambda: it uses a different IAM principal, and the probe is hardcoded to the default rather than a custom chat model. The final guide now acknowledges the principal distinction, so this implementation plan should not preserve the stronger incorrect conclusion.
The fastest general diagnostic is Step 6's `converse` probe. If it passes and the
deployed bot still fails, the problem is not model access.

docs/11-aws-bedrock-setup.md:64

  • The “local prerequisites” omit tools required later in this walkthrough. npm run smoke unconditionally uses jq and a curl build with --aws-sigv4, while Step 7's optional token command uses openssl; a fresh machine can pass the checks here and then fail verification. List and verify these tools up front.
**3. Dependencies are installed.** `npm install` and `npm test` from the README's
Quick start should both pass. Nothing here depends on AWS yet.

**4. The account has a valid payment method.** Bedrock is not a Free Tier service.

docs/11-aws-bedrock-setup.md:299

  • Selecting AWS_PROFILE only at deploy time can switch accounts after Steps 0–6. All earlier aws commands omit --profile, so a reader can verify and subscribe the default account, then deploy your-profile into a different account where model access is missing. Set/export the profile before Step 0's identity check and keep the printed account ID consistent throughout; do not introduce it here.
export AWS_PROFILE=your-profile          # defaults to `default`

docs/11-aws-bedrock-setup.md:42

  • The commands later in the guide rely on AWS CLI v2 behavior (notably configure export-credentials, binary input handling, and the newer Bedrock operations), but this prerequisite accepts any aws installation. Explicitly require and verify v2 so readers do not discover an unsupported CLI only at Steps 4–9.
**1. The AWS CLI is installed and authenticated.**

```bash
# Should print your account id, user id, and principal ARN.
aws sts get-caller-identity

docs/11-aws-bedrock-setup.md:372

  • Titan failures do not necessarily produce “a tick that runs and posts nothing.” runFetch catches embedding errors, still posts to Discord, and returns HTTP 200 with the error in the response (src/agent/fetch.ts:225-258, src/handler.ts:183-194). Tell readers to inspect the response error as well, otherwise the second-model access failure this guide aims to expose can look successful.
scheduled tick or redeploy with the variable set. If the trigger returns `403`, that is
the token or the signature — not Bedrock. Bedrock problems show up as a tick that runs
and posts nothing; check the Lambda's CloudWatch logs and match the exception against
[Troubleshooting](#troubleshooting).

docs/superpowers/plans/2026-08-10-aws-bedrock-setup-doc.md:605

  • An AWS Budget alarm is only a notification and does not cap or stop usage; this plan's own linked budget guide explicitly leaves Budget Actions out of scope. Calling it the “only real cap” creates a false operational safety guarantee that was copied into the final doc.
The $0.02–$0.04 range quoted in earlier revisions of this doc is a measured typical
case, not a budget ceiling — a leaked `FETCH_TRIGGER_TOKEN` lets an authorised caller
drive Bedrock calls as fast as they can sign requests, and the only real cap is the
budget alarm below. Lambda, S3, and EventBridge at this volume are rounding errors next

@equationalapplications
equationalapplications merged commit ab0a66f into main Aug 11, 2026
2 checks passed
@equationalapplications
equationalapplications deleted the docs/aws-bedrock-setup branch August 11, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants